package noema.dataModel;

import java.io.Serializable;

public class ExaminationOutcome implements Serializable{

	private static final long serialVersionUID = 1L;
	private String unit;
	private boolean dismiss;
	private String diagnosis;
	
	public ExaminationOutcome() {
		super();
	}
	
	public ExaminationOutcome(String unit, boolean dismiss, String diagnosis) {
		this();
		this.unit = unit;
		this.dismiss = dismiss;
		this.diagnosis = diagnosis;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public boolean isDismiss() {
		return dismiss;
	}

	public void setDismiss(boolean dismiss) {
		this.dismiss = dismiss;
	}

	public String getDiagnosis() {
		return diagnosis;
	}

	public void setDiagnosis(String diagnosis) {
		this.diagnosis = diagnosis;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((diagnosis == null) ? 0 : diagnosis.hashCode());
		result = prime * result + (dismiss ? 1231 : 1237);
		result = prime * result + ((unit == null) ? 0 : unit.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ExaminationOutcome other = (ExaminationOutcome) obj;
		if (diagnosis == null) {
			if (other.diagnosis != null)
				return false;
		} else if (!diagnosis.equals(other.diagnosis))
			return false;
		if (dismiss != other.dismiss)
			return false;
		if (unit == null) {
			if (other.unit != null)
				return false;
		} else if (!unit.equals(other.unit))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Examination [unit=" + unit + ", dismiss=" + dismiss
				+ ", diagnosis=" + diagnosis + "]";
	}	
}
